package com.xwzn.resident;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.xwzn.resident.adapter.TzggAdapter;

/**
 * @Description 通知公告的详细界面
 * @Author HanKaiYang
 * @CreateDate 2019/12/23 11:05
 * @Version 1.0
 */
public class TzggActivity extends AppCompatActivity {

    private ImageView ivTitleBack;
    private RecyclerView rlvTzgg;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tzgg);
        initView();
    }

    /**
     * @description  初始化视图
     * @author HanKaiYang
     * @createDate 2019/12/23 11:19
     * @version 1.0
     */
    private void initView() {
        ivTitleBack = (ImageView) findViewById(R.id.iv_title_back);
        rlvTzgg = (RecyclerView) findViewById(R.id.rlv_tzgg);

        ivTitleBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });

        TzggAdapter tzggAdapter = new TzggAdapter(getIntent().getStringArrayListExtra("data"));
        rlvTzgg.setLayoutManager(new LinearLayoutManager(this));
        rlvTzgg.setAdapter(tzggAdapter);
    }
}
